package com.demo.springboot;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.demo.springboot");
        System.out.println("Person :"+context.getBean("person0"));
        System.out.println("Person 遍历：");
        context.getBeansOfType(Person.class).values().forEach(System.out::println);
        context.close();

    }
}
